package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.FxyFinancialAccountSetsMapper;
import com.ruoyi.system.domain.FxyFinancialAccountSets;
import com.ruoyi.system.service.IFxyFinancialAccountSetsService;

/**
 * 账套Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-01-15
 */
@Service
public class FxyFinancialAccountSetsServiceImpl implements IFxyFinancialAccountSetsService 
{
    @Autowired
    private FxyFinancialAccountSetsMapper fxyFinancialAccountSetsMapper;

    /**
     * 查询账套
     * 
     * @param id 账套主键
     * @return 账套
     */
    @Override
    public List<FxyFinancialAccountSets> selectFxyFinancialAccountSetsById(Long id)
    {
        return fxyFinancialAccountSetsMapper.selectFxyFinancialAccountSetsById(id);
    }

    /**
     * 查询账套列表
     * 
     * @param fxyFinancialAccountSets 账套
     * @return 账套
     */
    @Override
    public List<FxyFinancialAccountSets> selectFxyFinancialAccountSetsList(FxyFinancialAccountSets fxyFinancialAccountSets)
    {
        return fxyFinancialAccountSetsMapper.selectFxyFinancialAccountSetsList(fxyFinancialAccountSets);
    }

    /**
     * 新增账套
     * 
     * @param fxyFinancialAccountSets 账套
     * @return 结果
     */
    @Override
    public int insertFxyFinancialAccountSets(FxyFinancialAccountSets fxyFinancialAccountSets)
    {
        return fxyFinancialAccountSetsMapper.insertFxyFinancialAccountSets(fxyFinancialAccountSets);
    }

    /**
     * 修改账套
     * 
     * @param fxyFinancialAccountSets 账套
     * @return 结果
     */
    @Override
    public int updateFxyFinancialAccountSets(FxyFinancialAccountSets fxyFinancialAccountSets)
    {
        return fxyFinancialAccountSetsMapper.updateFxyFinancialAccountSets(fxyFinancialAccountSets);
    }

    /**
     * 批量删除账套
     * 
     * @param ids 需要删除的账套主键
     * @return 结果
     */
    @Override
    public int deleteFxyFinancialAccountSetsByIds(Long[] ids)
    {
        return fxyFinancialAccountSetsMapper.deleteFxyFinancialAccountSetsByIds(ids);
    }

    /**
     * 删除账套信息
     * 
     * @param id 账套主键
     * @return 结果
     */
    @Override
    public int deleteFxyFinancialAccountSetsById(Long id)
    {
        return fxyFinancialAccountSetsMapper.deleteFxyFinancialAccountSetsById(id);
    }

    public List<FxyFinancialAccountSets> selectAccountSetsByTenantId(Long tenantId) {
       List<FxyFinancialAccountSets> fxyFinancialAccountSets= fxyFinancialAccountSetsMapper.selectAccountSetsByTenantId(tenantId);

        return fxyFinancialAccountSets;
    }
}
